/*
package com.huohuo.javabasic;

import org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient;
import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
import org.apache.jmeter.samplers.SampleResult;

import javax.annotation.Resource;

//1.创建类继承AbstractJavaSamplerClient并且实现runTest方法
public class JavaBasicTests extends AbstractJavaSamplerClient {
	//2.找到提供者的类名。
	@Resource
	private DemoService demoService;

	@Override
	public SampleResult runTest(JavaSamplerContext javaSamplerContext) {
		SampleResult sampleResult = new SampleResult(  );
		//3.接受jemeter传的参数
		String age = javaSamplerContext.getParameter( "age" );
		String sex = javaSamplerContext.getParameter( "sex" );
		//4.入参
		Person person = new Person();
		person.setAge( age);
		person.setAge( sex);
	    //5. 调用
		Person person1 = demoService.demo( person );
		//6. 打印返回结果
		sampleResult.setResponseOK();
		sampleResult.setResponseData( "你的名字是:"+person1,"utf-8" );
		//return sampleResult;
		return null;
	}
	//1.

	*/
/*@Resource
	private DemoService demoService;

	@Override
	public SampleResult runTest(JavaSamplerContext javaSamplerContext) {
		SampleResult sampleResult = new SampleResult(  );
		String name = javaSamplerContext.getParameter( "name" );
		String age = javaSamplerContext.getParameter( "age" );
		String sex = javaSamplerContext.getParameter( "sex" );

		Person person = new Person();
		person.setAge( age);
		person.setAge( sex);

		Person person1 = demoService.demo( person );

		sampleResult.setResponseOK();
		sampleResult.setResponseData( "你的名字是:"+person1,"utf-8" );
		return sampleResult;
	}*//*

}
*/
